package de.slothsoft.network;


public class ClientEvent {

	private final Client source;
	private final Exception error;
	private final Object incomingObject;

	public ClientEvent(Client source, Object object) {
		this.source = source;
		this.incomingObject = object;
		this.error = null;
	}

	public ClientEvent(Client source, Exception error) {
		this.source = source;
		this.incomingObject = null;
		this.error = error;
	}

	public Client getSource() {
		return this.source;
	}

	public Object getIncomingObject() {
		return this.incomingObject;
	}

	public Exception getError() {
		return this.error;
	}
}
